import 'package:flutter/material.dart';
import 'package:shihui/models/models.dart';
import 'package:shihui/resources/colors.dart';
import 'package:shihui/resources/iconfont.dart';
import 'package:shihui/resources/res_index.dart';
import 'package:shihui/ui/pages/page_index.dart';
import 'package:shihui/utils/util_index.dart';

class UserPage extends StatefulWidget {
  @override
  _UserPageState createState() {
  
    return _UserPageState();
  }
}

class _UserPageState extends State<UserPage> {

  @override
  void initState() {
   
    super.initState();


  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      color: Colors.white,
      child: ListView(
        children: <Widget>[
          Container(
            width: 120,
            child: Image.asset(
              Utils.getImgPath('ucenter_logo'),
              width: 120,
            ),
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Material(
                child: RaisedButton(
                  color: Theme.of(context).primaryColor,
                  textColor: Colors.white,
                  child: Text(
                    IntlUtil.getString(context, Ids.titleSignIn),
                    style: TextStyle(
                      fontSize: ScreenUtil.getScaleSp(context, 12.0),
                    ),
                  ),
                  onPressed: () {},
                  elevation: 0,
                  shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(32.0)),
                ),
              ),
              Padding(
                padding: EdgeInsets.only(left: 32.0),
                child: OutlineButton(
                  child: Text(
                    IntlUtil.getString(context, Ids.titleSignUp),
                    style: TextStyle(
                      fontSize: ScreenUtil.getScaleSp(context, 12.0),
                    ),
                  ),
                  onPressed: () {},
                  textColor: Theme.of(context).primaryColor,
                  borderSide: BorderSide(color: Theme.of(context).primaryColor),
                  highlightedBorderColor: Theme.of(context).primaryColor,
                  shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(32.0)),
                ),
              ),

              // new ListView.builder(
              //     itemCount: _list.length,
              //     itemBuilder: (BuildContext context, int index) {
              //       UserCellModel model = _list[index];
              //       return new ListTile(
              //         title: new Text(
              //           IntlUtil.getString(context, model.title),
              //           style: new TextStyle(fontSize: 13.0),
              //         ),
              //         contentPadding: EdgeInsets.only(left: 16.0, right: 8.0),
              //         trailing: Padding(
              //             padding: EdgeInsets.all(0.0),
              //             child: Icon(
              //               IconFont.jiantou,
              //               size: 18.0,
              //             )),
              //       );
              //     }),
            ],
          ),
          Padding(
            padding: EdgeInsets.only(top: 16.0),
            child: Divider(
              height: 0.5,
            ),
          ),
          ListTile(
            title: Row(
              children: <Widget>[
                Icon(
                  IconFont.yuyue,
                  color: ColorT.gray_66,
                ),
                Padding(
                  padding: EdgeInsets.only(left: 10.0),
                  child: Text(
                    IntlUtil.getString(context, Ids.titleMyAppointment),
                    style: TextStyle(fontSize: 15.0),
                  ),
                ),
              ],
            ),
          ),
          Divider(
            height: 0.5,
          ),
          ListTile(
            title: Row(
              children: <Widget>[
                Icon(
                  IconFont.process,
                  color: ColorT.gray_66,
                ),
                Padding(
                  padding: EdgeInsets.only(left: 10.0),
                  child: Text(
                    IntlUtil.getString(context, Ids.titleProcess),
                    style: TextStyle(fontSize: 15.0),
                  ),
                ),
              ],
            ),
            onTap: () {
              NavigatorUtil.pushPage(context, ProcessPage(),pageName: Ids.titleProcess);
            },
          ),
          Divider(
            height: 0.5,
          ),

          ListTile(
            title: Row(
              children: <Widget>[
                Icon(
                  IconFont.guanyu,
                  color: ColorT.gray_66,
                ),
                Padding(
                  padding: EdgeInsets.only(left: 10.0),
                  child: Text(
                    IntlUtil.getString(context, Ids.titleAbout),
                    style: TextStyle(fontSize: 15.0),
                  ),
                ),
              ],
            ),
            onTap: () {
              NavigatorUtil.pushPage(context, AboutPage(),pageName: Ids.titleProcess);
            },
          ),
          Divider(
            height: 0.5,
          ),
          ListTile(
            title: Row(
              children: <Widget>[
                Icon(
                  IconFont.setting,
                  color: ColorT.gray_66,
                ),
                Padding(
                  padding: EdgeInsets.only(left: 10.0),
                  child: Text(
                    IntlUtil.getString(context, Ids.titleSetting),
                    style: TextStyle(fontSize: 15.0),
                  ),
                ),
              ],
            ),
            onTap: () {
              NavigatorUtil.modalPage(context, SettingPage(),pageName: Ids.titleSetting);
            },
          ),
          Divider(
            height: 0.5,
          ),
        ],
      ),
    );
  }
}
